/**
 * Copyright (c) [2020] China Canpool Team, All rights reserved.
 *
 * vlink is licensed under the Mulan PSL v1.
 * You can use this software according to the terms and conditions of the Mulan PSL v1.
 * You may obtain a copy of Mulan PSL v1 at:
 *
 *    http://license.coscl.org.cn/MulanPSL
 *
 * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER
 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR
 * FIT FOR A PARTICULAR PURPOSE.
 * See the Mulan PSL v1 for more details.
 */

#include "style.h"

#include <stdio.h>
#include <string.h>

/* defines */

#define STYLE_MAX_NUM       10

/* macros */

/* typedefs */

typedef struct style_attr {
    char  * name;
    int     value;
    int     type;
} style_attr_t;

/* locals */

static char   s_value[5] = {0};
static int    s_type     = 0;
static char * s_name     = NULL;

static void __style_print(void)
{
    printf("hello c style\n");
}

static void __style_entry(uintptr_t arg)
{
    int i;

    while (1) {
        for (i = 0; i < 5; ++i) {
            /* code */
        }
    }
}

/* inlines */

/* externs */

int style_type(void)
{
    return 0;
}

/**
 * @brief set style type
 *
 * @param type  [in] the type
 *
 * @retval 0    success
 * @retval -1   failed
 */
int style_set_type(int type)
{
    switch (type) {
        case STYLE_TYPE_C: {
            /* code */
            break;
        }
        default:
            return -1;
    }
    return 0;
}

char * style_name(void)
{
    return NULL;
}

int style_set_name(const char *name)
{
    if (name == NULL) {
        return -1;
    }

    return 0;
}
